package com.fortune.dao;

import com.fortune.common.acl.PageQuery;
import com.fortune.entity.DUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(DUser record);

    int insertSelective(DUser record);

    DUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DUser record);

    int updateByPrimaryKey(DUser record);

    DUser findByKeyword(@Param("keyword") String keyword);

    int countByMail(@Param("mail") String mail, @Param("id") Integer id);

    int countByTelephone(@Param("telephone") String telephone, @Param("id") Integer id);

    int countByDeptId(@Param("deptId") int deptId);

    List<DUser> getPageByDeptId(@Param("deptId") int deptId, @Param("page") PageQuery page);

    List<DUser> getByIdList(@Param("idList") List<Integer> idList);

    List<DUser> getAll();

}